<template>
    <div class="about">
        <h1>This is an fenlei page</h1>
        <h2>{{ $store.state.nickname }}</h2>
        <ul>
            <li v-for="(item, index) in $store.getters.male" :key="index">
                {{ item.name }}
            </li>
        </ul>
        <button @click="zz">测试</button>
    </div>
</template>

<script>
/* eslint-disable */ // 忽略该行往下 eslint的错误
import Footer from "../components/Footer";

export default {
    components: {
        Footer
    },
    data() {
        return {};
    },
    methods: {
      // 兄弟组件传参
        zz() {
            this.$bus.$emit("change");
        }
    },
    created() {
      this.$get('http://localhost:9999/show.json').then(r=>{
        let arr = r.filter((arr,i)=>{
          return i<3
        })
        console.log(arr);
      })
    },
};
</script>

<style scoped>
.about {
    padding: 20px;
    border: 1px solid red;
}
</style>
